package cn.sxy.mybatis.datasource.pooled;

import cn.sxy.mybatis.datasource.unpooled.UnpooledDataSource;
import cn.sxy.mybatis.datasource.unpooled.UnpooledDataSourceFactory;

import javax.sql.DataSource;

public class PooledDataSourceFactory extends UnpooledDataSourceFactory {

    //props父类继承过来的
//    @Override
//    public DataSource getDataSource() {
//        PooledDataSource pooledDataSource = new PooledDataSource();
//        pooledDataSource.setDriver(props.getProperty("driver"));
//        pooledDataSource.setUrl(props.getProperty("url"));
//        pooledDataSource.setUsername(props.getProperty("username"));
//        pooledDataSource.setPassword(props.getProperty("password"));
//        return pooledDataSource;
//    }

    public PooledDataSourceFactory() {
        this.dataSource = new PooledDataSource();
    }


}
